package syllabus.service.impl;

import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import syllabus.dao.PCourseMapper;
import syllabus.model.Criteria;
import syllabus.model.PCourse;
import syllabus.service.PCourseService;

@Service
public class PCourseServiceImpl implements PCourseService {
    @Autowired
    private PCourseMapper pCourseMapper;

    private static final Logger logger = LoggerFactory.getLogger(PCourseServiceImpl.class);

    public int countByExample(Criteria example) {
        int count = this.pCourseMapper.countByExample(example);
        logger.debug("count: {}", count);
        return count;
    }

    public PCourse selectByPrimaryKey(Integer id) {
        return this.pCourseMapper.selectByPrimaryKey(id);
    }

    public List<PCourse> selectByExample(Criteria example) {
        return this.pCourseMapper.selectByExample(example);
    }

    public int deleteByPrimaryKey(Integer id) {
        return this.pCourseMapper.deleteByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(PCourse record) {
        return this.pCourseMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(PCourse record) {
        return this.pCourseMapper.updateByPrimaryKey(record);
    }

    public int deleteByExample(Criteria example) {
        return this.pCourseMapper.deleteByExample(example);
    }

    public int updateByExampleSelective(PCourse record, Criteria example) {
        return this.pCourseMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(PCourse record, Criteria example) {
        return this.pCourseMapper.updateByExample(record, example);
    }

    public int insert(PCourse record) {
        return this.pCourseMapper.insert(record);
    }

    public int insertSelective(PCourse record) {
        return this.pCourseMapper.insertSelective(record);
    }

	public int insertAllIntoSyllabus(Criteria c) {
		return this.pCourseMapper.insertAllIntoSyllabus(c);
	}
}